<!DOCTYPE html>
<html>
<#include "../../common/header.ftl">
<script src="${basePath}/js/goodsBrand/list.js?v=201711021700"></script>

<head>
<meta charset="UTF-8">
<title>商品品牌管理</title>
<style>
	.left{
		float:left;
		min-width:100px;
		margin-left: 10px;
	}
	.table-margin{
		margin:5px 3%;
		width:92%;
	}
</style>

</head>
<body>
<div class="container" style="margin-left:5%;width:90%">
	<div class="layui-form-item">
	 <div class="layui-input-block left">
	      <input type="text" id="keyword" name="keyword" value="${param.keyword!''}" placeholder="名称/英文名称" autocomplete="off" 
	      class="layui-input" style="width:400px;margin-right:200px;margin-left:30px">
	    </div>
	     <div class="layui-input-block left">
	      <button type="button" class="layui-btn"  id="search-button">搜索</button>
	     <#if permission?? && (permission.P1303??)>
	      <button type="button" class="layui-btn" id="add-button">添加品牌信息</button>
	     </#if>
	    </div>
	</div>
</div>
<table class="table table-margin">
  <thead>
      <tr>
         <th>品牌名称</th>
         <th>英文名称</th>
         <th>创建者</th>
         <th>创建时间</th>
         <th>操作</th>
      </tr>
  </thead>
  <tbody>
	<#list page.itemList ! as brand>
		<tr>
			<td>${brand.name!}</td>
			<td>${brand.englishName!}</td>
			<td>${brand.creator!}</td>
			<td>${brand.createTime?string("yyyy-MM-dd HH:mm")}</td>
			<td >
				<div class="btn-group ">
				  <button type="button" class="btn btn-primary dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
				    	操作<span class="caret"></span>
				  </button>
				  <ul class="dropdown-menu">
				   <#if permission?? && (permission.P1303??)>
				    <li><a href="#" onclick="openEdit('${brand.id}')">修改</a></li>
				   </#if>
				    <#if permission?? && (permission.P1306??)>
				    <li><a href="#" onclick="deleteFun('${brand.id}')">删除</a></li>
				    </#if>
				  </ul>
				</div>
			</td>
		</tr>
	</#list>
  </tbody>
</table>
<#-- 翻页模块代码 -->
<ul class="pager">
	<li><a href="#" onclick="fanye('1')">首页</a></li>
	<#if (page.pageNo>1) > 
	<li><a	href="#" onclick="fanye('${page.prevPage}')">上一页</a></li>
	<#else>
	<li><a>上一页</a></li> 
	</#if>
	<li><a href="#">第${page.pageNo}页/共${page.totalPage}页</a></li>
	<#if (page.nextPage>page.pageNo) >
	<li><a href="#" onclick="fanye('${page.nextPage}')">下一页</a></li>
	<#else>
	<li><a>下一页</a></li>
	</#if>
	<li><a href="#" onclick="fanye('${page.totalPage}')">尾页</a></li>
</ul>
</body>
<script type="text/javascript">
	var basePath="${basePath}";
	var init={
	    "keyword":"${param.keyword!}"
	}
	$(function(){
		layui.use(['form', 'layer'] , function(){
		  var layer = layui.layer;
		  var form = layui.form(); 
		});
	});
</script>
</html>